﻿using UnityEngine;

namespace TC
{
    public class ShowBubble : FunctionNode
    {
        public ValueInput<int> target;
        public ValueInput<string> content;
        public ValueInput<float> duration;
        public ValueInput<float> time;
        public ValueInput<int> loop;

        public override void OnCreate()
        {
            base.OnCreate();

            target = this.AddValueInPort<int>("target");
            content = this.AddValueInPort<string>("content");
            duration = this.AddValueInPort<float>("duration");
            time = this.AddValueInPort<float>("time");
            loop = this.AddValueInPort<int>("loop");
        }

        public override void Execute(Dispatcher chain)
        {
            base.Execute(chain);

            Debug.Log("ShowBubble id: " + target.Value + ", content: " + content.Value);

            chain.Call(flowOut);
        }
    }
}
